<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/19
 * Time: 11:01
 */
function fun($i){
    if ($i>0){
        echo $i;
        $i--;
        fun($i);
    }

}
fun(5);


//5 = 5*4*3*2*1
function j($num){
    if ($num<=1){
        return 1;
    } else {
        return $num * j($num-1);
    }
}
$r = j(5);
var_dump($r);
